home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 010a / ps_bios.zip / PS-BIOS.ASM < prev    next >
Assembly Source File  |  1991-04-21  |  11KB  |  275 lines

  1. ; Customized table for PERSTOR PS180-8AT/XT controller.
  2. ;
  3. ; By Bruce Travers - GEnie: TRAVERS
  4. ;
  5. ; Based on original SET_TYPE by Juan Jimenez.
  6. ;
  7. ; This program and source code may be freely distributed. It will 
  8. ; load a drive parameter table into memory and point the Perstor 
  9. ; controller to it instead of its own ROM table. This means you can
  10. ; change the table at your convenience to suit any type of drive. This
  11. ; works on my AT compatable 386 system with PS-180-8AT/XT controllers
  12. ; with universal BIOS. I do not guarantee it will work on every system.
  13. ;
  14. ; See the SET_TYPE.ASM file in this archive for some interesting 
  15. ; comments by Juan. This program is essentially the same except it has
  16. ; been modified to suit Perstor controllers.
  17. ;  
  18. ; 1) Jumper the Perstor controller so that drive unit 0 is the same number
  19. ;    of heads as your actual disk drive. Try and use table 1 if possible
  20. ;    since this will save you RAM because you won't have to load all
  21. ;    the tables resident. 
  22. ;
  23. ;    Example: You have a Seagate ST-251 with 820 cylinders and 6 heads.
  24. ;    Jumper the Perstor as Table 1 Entry 1 (615 cylinders by 6 heads).
  25. ;    Even though 820/6 is directly supported this means you will have to
  26. ;    use Table 3 at the cost of an extra 128 bytes RAM (each table contains
  27. ;    4 drives at 16 bytes per drive). Of course, if you don't mind using the
  28. ;    extra RAM you should choose the table that has an exact match if possible.
  29. ;
  30. ;    - If you can't find an entry with the same number of heads, try one with
  31. ;      less heads. I don't know if it will work or not but the original 
  32. ;      SET_TYPE indicated it would.
  33. ;
  34. ;    - Use an entry with less cylinders than your actual disk drive. I have 
  35. ;      tried more heads and it seems to work but why take chances ?
  36. ;
  37. ; 2) The table selected in step 1 is now the table where we can change the
  38. ;    parameters. This source includes parameters as documented for
  39. ;    the Universal BIOS. Find the table you chose in step 1 and modify the
  40. ;    4 drive entries to suit your disk drives. Don't forget to change the
  41. ;    boot disk to its actual parameters!
  42. ;
  43. ; 3) If you have more than 1 disk drive, jumper the Perstor unit 1 to 
  44. ;    reflect the entry which you changed in the source below, as it will
  45. ;    be your table not the ROM. (Likewise if you have 2 additional drives
  46. ;    on another Perstor).
  47. ;
  48. ; 4) Assemble and link the program and try it out. Disk Manager and other
  49. ;    utilities which use those tables should now report the correct number
  50. ;    of heads and cylinders as per your customization. (Use ASSEMBLE.BAT).
  51. ;    
  52. ; 5) If you want to save memory, delete all the tables AFTER the table you
  53. ;    are using. In my case, I use table 1 so have deleted tables 2-4 and
  54. ;    end up using 64 bytes of RAM instead of 256 bytes. These are BYTES,
  55. ;    not K Bytes so some people may not bother!
  56. ;    You may also delete the entries in the same table AFTER the entries
  57. ;    you are using. In my case I am using entry 1 through 3 so have deleted
  58. ;    entry 4 and saved another 16 bytes. 
  59. ;
  60. ; 6) An alternative method of modifying the table is to modify PS-BIOS.COM
  61. ;    using a disk editor such as Norton. Find the hex values and change them
  62. ;    to whatever your drives really are.
  63. ;-----------------------------------------------------------------------------
  64. code            segment    para
  65.                 assume     cs:code,ds:code
  66.                 org        100h
  67. psbios          proc       far
  68.                 jmp        init
  69.  
  70. table1:         dw         615d             ; cyls       ENTRY 1
  71.                 db         6d               ; heads
  72.                 dw         615d             ; cyls
  73.                 dw         615d             ; cyls
  74.                 db         0bh
  75.                 db         05h
  76.                 db         0
  77.                 db         0
  78.                 db         0
  79.                 dw         0
  80.                 db         0
  81.                 db         0
  82.                 dw         615d             ; cyls       ENTRY 2
  83.                 db         8d               ; heads
  84.                 dw         615d             ; cyls
  85.                 dw         615d             ; cyls
  86.                 db         0bh
  87.                 db         05h
  88.                 db         0
  89.                 db         0
  90.                 db         0
  91.                 dw         0
  92.                 db         0
  93.                 db         0
  94.                 dw         733d             ; cyls       ENTRY 3
  95.                 db         5d               ; heads
  96.                 dw         733d             ; cyls
  97.                 dw         733d             ; cyls
  98.                 db         0bh
  99.                 db         05h
  100.                 db         0
  101.                 db         0
  102.                 db         0
  103.                 dw         0
  104.                 db         0
  105.                 db         0
  106.                 dw         733d             ; cyls       ENTRY 4
  107.                 db         7d               ; heads
  108.                 dw         733d             ; cyls
  109.                 dw         733d             ; cyls
  110.                 db         0bh
  111.                 db         05h
  112.                 db         0
  113.                 db         0
  114.                 db         0
  115.                 dw         0
  116.                 db         0
  117.                 db         0
  118. table2:         dw         612d             ; cyls       ENTRY 1
  119.                 db         4d               ; heads
  120.                 dw         612d             ; cyls
  121.                 dw         612d             ; cyls
  122.                 db         0bh
  123.                 db         05h
  124.                 db         0
  125.                 db         0
  126.                 db         0
  127.                 dw         0
  128.                 db         0
  129.                 db         0
  130.                 dw         1024d            ; cyls       ENTRY 2
  131.                 db         5d               ; heads
  132.                 dw         1024d            ; cyls
  133.                 dw         1024d            ; cyls
  134.                 db         0bh
  135.                 db         05h
  136.                 db         0
  137.                 db         0
  138.                 db         0
  139.                 dw         0
  140.                 db         0
  141.                 db         0
  142.                 dw         1024d            ; cyls       ENTRY 3
  143.                 db         8d               ; heads
  144.                 dw         1024d            ; cyls
  145.                 dw         1024d            ; cyls
  146.                 db         0bh
  147.                 db         05h
  148.                 db         0
  149.                 db         0
  150.                 db         0
  151.                 dw         0
  152.                 db         0
  153.                 db         0
  154.                 dw         1024d            ; cyls       ENTRY 4
  155.                 db         15d              ; heads
  156.                 dw         1024d            ; cyls
  157.                 dw         1024d            ; cyls
  158.                 db         0bh
  159.                 db         05h
  160.                 db         0
  161.                 db         0
  162.                 db         0
  163.                 dw         0
  164.                 db         0
  165.                 db         0
  166. table3:         dw         615d             ; cyls       ENTRY 1
  167.                 db         4d               ; heads
  168.                 dw         615d             ; cyls
  169.                 dw         615d             ; cyls
  170.                 db         0bh
  171.                 db         05h
  172.                 db         0
  173.                 db         0
  174.                 db         0
  175.                 dw         0
  176.                 db         0
  177.                 db         0
  178.                 dw         977d             ; cyls       ENTRY 2
  179.                 db         5d               ; heads
  180.                 dw         977d             ; cyls
  181.                 dw         977d             ; cyls
  182.                 db         0bh
  183.                 db         05h
  184.                 db         0
  185.                 db         0
  186.                 db         0
  187.                 dw         0
  188.                 db         0
  189.                 db         0
  190.                 dw         820d             ; cyls       ENTRY 3
  191.                 db         6d               ; heads
  192.                 dw         820d             ; cyls
  193.                 dw         820d             ; cyls
  194.                 db         0bh
  195.                 db         05h
  196.                 db         0
  197.                 db         0
  198.                 db         0
  199.                 dw         0
  200.                 db         0
  201.                 db         0
  202.                 dw         1024d            ; cyls       ENTRY 4
  203.                 db         9d               ; heads
  204.                 dw         1024d            ; cyls
  205.                 dw         1024d            ; cyls
  206.                 db         0bh
  207.                 db         05h
  208.                 db         0
  209.                 db         0
  210.                 db         0
  211.                 dw         0
  212.                 db         0
  213.                 db         0
  214. table4:         dw         925d             ; cyls       ENTRY 1
  215.                 db         5d               ; heads
  216.                 dw         925d             ; cyls
  217.                 dw         925d             ; cyls
  218.                 db         0bh
  219.                 db         05h
  220.                 db         0
  221.                 db         0
  222.                 db         0
  223.                 dw         0
  224.                 db         0
  225.                 db         0
  226.                 dw         925d             ; cyls       ENTRY 2
  227.                 db         9d               ; heads
  228.                 dw         925d             ; cyls
  229.                 dw         925d             ; cyls
  230.                 db         0bh
  231.                 db         05h
  232.                 db         0
  233.                 db         0
  234.                 db         0
  235.                 dw         0
  236.                 db         0
  237.                 db         0
  238.                 dw         1024d            ; cyls       ENTRY 3
  239.                 db         7d               ; heads
  240.                 dw         1024d            ; cyls
  241.                 dw         1024d            ; cyls
  242.                 db         0bh
  243.                 db         05h
  244.                 db         0
  245.                 db         0
  246.                 db         0
  247.                 dw         0
  248.                 db         0
  249.                 db         0
  250.                 dw         925d             ; cyls       ENTRY 4
  251.                 db         5d               ; heads
  252.                 dw         925d             ; cyls
  253.                 dw         925d             ; cyls
  254.                 db         0bh
  255.                 db         05h
  256.                 db         0
  257.                 db         0
  258.                 db         0
  259.                 dw         0
  260.                 db         0
  261.                 db         0
  262. theend:         db         0                ; Do Not Delete
  263. init:           mov        ax,cs
  264.                 mov        ds,ax
  265.                 mov        dx,offset table1
  266.                 mov        ah,25h
  267.                 mov        al,41h
  268.                 int        21h
  269.                 mov        dx,offset theend
  270.                 int        27h
  271. psbios          endp
  272. code            ends
  273.                 end        psbios 
  274.